import {Box, Static, FontIcon} from '../components'

// type textIconPropsType = {
//     label?:string,
//     icon?:string,
//     fontSize?:string,
//     marginBottom?:string,
//     marginRight?:string,
//     icon?:string,
//     color?:string,
//     iconSize?:string,
//     iconColor?:string,
//     style?:object,
//     iconRight:boolean,
//     hover?:string,
//     onClick?:Function
//
// }

const TextIcon = ({label,icon,fontSize,marginBottom,marginRight,color,iconSize,iconColor,style,iconRight,hover,onClick}) => {
    return(

        iconRight
            ? <Box onClick={onClick} flex='flex' justify='flex-start'>
                <Static label={label} hover={hover} fontSize={fontSize || '.75rem'} marginRight={marginRight} marginBottom={marginBottom} color={color || '#9fa3b0'}/>
                <FontIcon icon={icon} hover={hover} fontSize={iconSize || '.9rem'} color={iconColor || '#9fa3b0'} style={style}/>
            </Box>
            :<Box onClick={onClick} flex='flex' justify='flex-start'>
                <FontIcon icon={icon} hover={hover} fontSize={iconSize || '.9rem'} color={iconColor || '#9fa3b0'} style={{marginRight:'.2rem',style}} />
                <Static label={label} hover={hover} fontSize={fontSize || '.75rem'} marginRight={marginRight} marginBottom={marginBottom} color={color || '#9fa3b0'}/>
            </Box>

    )
};

export default TextIcon